{% extends "manage/manage_base.html" %}
{% load i18n %}

{% block help_link %}user/management/catalog/categories.html{% endblock %}

{% block title %}{% trans "Manage Category" %}{% endblock %}
{% block section %}manage-category{% endblock %}
{% block left_slot %}
    <div id="categories-portlet">
        {{ categories_portlet|safe }}
    </div>
{% endblock %}

{% block content %}
    <div class="site-actions">
        <a class="add"
           href="{% url lfs_manage_add_top_category %}?came_from={% url lfs_manage_category category.id %}">
            {% trans 'Add Top Category' %}
        </a>
        {% if category %}
            <a class="add"
               href="{% url lfs_manage_add_category category.id %}?came_from={% url lfs_manage_category category.id %}">
                {% trans 'Add Category' %}
            </a>
            <a class="delete delete-link"
                 dialog_message="{{ dialog_message }}"
                 href="{% url lfs_delete_category category.id %}">
                 {% trans 'Delete Category' %}</a>
            <a class="preview popup-link"
               href="{% url lfs_category_by_id category.id %}">
                {% trans 'View Category' %}
            </a>
            <a class="preview"
               href="{% url lfs_category_by_id category.id %}">
                {% trans 'Goto Category' %}
            </a>
        {% endif %}
    </div>
    <div id="category-tabs"
         data="#category_{{ category.id }}">
        <ul>
            <li class="ui-tabs-nav-item"><a href="#data">{% trans "Data" %}</a></li>
            <li class="ui-tabs-nav-item"><a href="#view">{% trans 'View' %}</a></li>
            <li class="ui-tabs-nav-item"><a href="{% url lfs_load_products_tab category.id %}">{% trans 'Products' %}</a></li>
            <li class="ui-tabs-nav-item"><a href="#seo">{% trans 'SEO' %}</a></li>
            <li class="ui-tabs-nav-item"><a href="#portlets">{% trans 'Portlets' %}</a></li>
        </ul>
        <div id="data">
            {{ data|safe }}
        </div>
        <div id="view">
            {{ view|safe }}
        </div>
        <div id="seo">
            {{ seo|safe }}
        </div>
        <div id="portlets">
            {{ portlets|safe }}
        </div>
    </div>
{% endblock %}
